import { VueQueryPlugin } from "@tanstack/vue-query";
import { createSSRApp } from "vue";
import App from "./App.vue";
import { requestInterceptor } from "./http/interceptor";
import { routeInterceptor } from "./router/interceptor";

import uviewPlus from "uview-plus";
import CustomNavBar from "@/components/CustomNavBar/index.vue";

import store from "./store";
import "@/style/index.scss";
import "virtual:uno.css";

export function createApp() {
	const app = createSSRApp(App);
	app.component("CustomNavBar", CustomNavBar);
	app.use(store);
	app.use(routeInterceptor);
	app.use(requestInterceptor);
	app.use(VueQueryPlugin);
	app.use(uviewPlus);
	return {
		app
	};
}
